package com.lzy.cloud.ribbon;

import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ellengou
 * Date: 2018-03-14
 * Time: PM 7:19
 *
 * @author ellengou
 */
@EnableDiscoveryClient
@SpringBootApplication
public class LzyCloudRibbonApplication {
    public static void main(String[] args) {
        new SpringApplicationBuilder(LzyCloudRibbonApplication.class).bannerMode(Banner.Mode.LOG).run(args);
    }

    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
